package com.ks.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.ks.api.entity.KsUser;

import java.time.LocalDateTime;

@Mapper
public interface KsUserMapper extends BaseMapper<KsUser> {
    
    KsUser findByOpenId(@Param("openId") String openId);
    
    int insert(KsUser user);
    
    int update(KsUser user);
    
    int updateSessionKey(@Param("openId") String openId, @Param("sessionKey") String sessionKey, @Param("lastLoginTime") LocalDateTime lastLoginTime);
    
    int updateCultivationScore(@Param("openId") String openId, @Param("cultivationScore") Integer cultivationScore);
} 